﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KinTN_WMS_CL.Model
{
    [Table("StorageLocations")]
    public class StorageLocations : ModelBase
    {
        /// <summary>
        /// 库位编码
        /// </summary>
        [Column("Code")]
        [Required]
        public string Code { set; get; }

        /// <summary>
        /// 库位名称
        /// </summary>
        [Column("Name")]
        [Required]
        public string Name { set; get; }

        /// <summary>
        /// 长度
        /// </summary>
        [Column("Length")]
        public int? Length { set; get; }

        /// <summary>
        /// 宽度
        /// </summary>
        [Column("Width")]
        public int? Width { set; get; }

        /// <summary>
        /// 高度
        /// </summary>
        [Column("Height")]
        public int? Height { set; get; }

        /// <summary>
        /// 是否启用
        /// </summary>
        [Column("IsEnable")]
        public bool IsEnable { set; get; } = true;

        /// <summary>
        /// 排序
        /// </summary>
        [Column("Sort")]
        public int Sort { set; get; } = 0;

        /// <summary>
        /// 标定尺寸
        /// </summary>
        [Column("CalibratedSize")]
        [Required]
        public int CalibratedSize { set; get; } = 0;

        /// <summary>
        /// 仓库id
        /// </summary>
        public string WarehousesCode { set; get; }

        /// <summary>
        /// 仓库id
        /// </summary>
        [ForeignKey("WarehousesCode")]
        public Warehouses   Warehouses { set; get; }
    }
}